﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PrintExpress.aspx.cs" Inherits="CNVP.JShop.Web.Admin.PrintExpress" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
            <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta content="IE=7" http-equiv="X-UA-Compatible" />
    <link href="CSS/Edit.css" rel="stylesheet" type="text/css" />
    <script src="../Scripts/jquery.js" type="text/javascript"></script>
    <script src="../Scripts/Common.js" type="text/javascript"></script>
    <script type="text/javascript">
        //选择省份时引发的动作
        function ProvinceChange() {
            var ddlProvince = document.getElementById("<%=ddlProvince.ClientID %>");
            var selectCity = document.getElementById("selectCity");
            selectCity.innerHTML = GetAjaxResponse("CommonWindows/AjaxCity.aspx?Type=ProvinceID&Code=" + ddlProvince.value);
            if(ddlProvince.value==<%=Province %>)
            {
                var ListCity = document.getElementById("ListCity");
                ListCity.value=<%=City %>;
            }
            CityChange();
            
        }
        //选择市时引发的动作
        function CityChange() {
            var ListCity = document.getElementById("ListCity");
            var selectArea = document.getElementById("selectArea");
            selectArea.innerHTML = GetAjaxResponse("CommonWindows/AjaxCity.aspx?Type=CityID&Code=" + ListCity.value);
            if(ListCity.value==<%=City %>)
            {
                var ListArea = document.getElementById("ListArea");
                ListArea.value=<%=Area %>;
            }
        }
        //发货地址
        function PostAddressChange() {
            var ddlPostAddress = document.getElementById("<%=ddlPostAddress.ClientID %>");
            var PostAddress = document.getElementById("PostAddress");
            PostAddress.innerHTML = GetAjaxResponse("CommonWindows/AjaxPostAddress.aspx?ID=" + ddlPostAddress.value);
        }
        //转到打印界面
        function RedirectToPrint(OrderID,DeliveryWay)
        {
            var ddlPostAddress = document.getElementById("<%=ddlPostAddress.ClientID %>");
            window.open("PrintExpressByTemplate.aspx?ID="+DeliveryWay+"&OrderID="+OrderID+"&PostAddressID=" + ddlPostAddress.value + "");
        }
    </script>
</head>
<body onload="ProvinceChange();PostAddressChange();">
    <form id="form1" runat="server">
        <div class="Content">
            <h3>收货地址信息</h3>
            <table border="0" cellpadding="0" cellspacing="0" width="100%" class="division">
                <tr>
                    <th>
                        姓名：</th>
                    <td colspan="3">
                        <asp:TextBox ID="txtGetTrueName" runat="server"></asp:TextBox>
                    </td>
                    <td rowspan="6">
                        <table border="0" cellpadding="0" cellspacing="0" width="100%">
                            <tr>
                                <td>
                                    您也可以将<br />编辑过的收<br />货地址更新<br />至订单</td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Button ID="btSaveAddress" runat="server" Text="保存订单地址" 
                                        onclick="btSaveAddress_Click" />
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <th>
                        省区：</th>
                    <td colspan="3">
                        <asp:DropDownList ID="ddlProvince" runat="server">
                        <asp:ListItem Value="0" Text="--请选择--"></asp:ListItem>
                        </asp:DropDownList>
                        <span id="selectCity"></span>
                        <span id="selectArea"></span>
                         
                        </td>
                </tr>
                <tr>
                    <th>
                        地址：</th>
                    <td colspan="3">
                        <asp:TextBox ID="txtGetAddress" runat="server" Width="350px"></asp:TextBox>
                    </td>
                </tr>
                 <tr>
                    <th>
                        邮编：</th>
                    <td  colspan="3">
                        <asp:TextBox ID="txtZipCode" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <th>
                        手机：</th>
                    <td>
                        <asp:TextBox ID="txtMobilePhone" runat="server"></asp:TextBox>
                    </td>
                    <th>
                        电话：</th>
                    <td>
                        <asp:TextBox ID="txtPhone" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <th>
                        备注：</th>
                    <td colspan="3">
                        <asp:TextBox ID="txtText" runat="server" Rows="5" TextMode="MultiLine" 
                            Width="350px"></asp:TextBox>
                    </td>
                </tr>
            </table>
            <h3>发货地址信息</h3>
            <asp:DropDownList ID="ddlPostAddress" runat="server">
            </asp:DropDownList>
            <div id="PostAddress"></div>
            <div class="EditBtn">
                <asp:Literal ID="literText" runat="server"></asp:Literal>
            </div>
    </div>
    </form>
</body>
</html>
